package com.ettractions.kiosk.commands
{
	import com.ettractions.kiosk.events.ImagePreloadServiceEvent;	
	import com.ettractions.kiosk.events.ViewEvent;
	import com.ettractions.kiosk.assets.AssetsStore;
	import com.ettractions.kiosk.assets.Assets;
	
	import org.robotlegs.mvcs.Command;

	public class InitializeViewCommand extends Command
	{
		[Inject]
		public var event:ImagePreloadServiceEvent;
		
		override public function execute():void
		{
			Assets.preloadedImages = event.images;
			
			eventDispatcher.dispatchEvent(new ViewEvent(ViewEvent.VIEW_INITIALIZED));
		}
	}
}